home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / superopt.lha / superopt-2.2 / TODO < prev    next >
Text File  |  1992-12-14  |  3KB  |  79 lines

  1. * I'd like to have a means to define that a goal function is not defined
  2.   for all possible input values.  On extra parameter, ALLOWED_ARGUMENTS, to
  3.   DEF_GOAL could take care of that.
  4.  
  5.   Also I'd like to add a list of immediate values to try for each goal
  6.   function.  For example, 31 and 32 could be useful for ffs.
  7.  
  8. * Make it possible to handle more immediate values.
  9.  
  10. * Interpret goal functions so the user doesn't need to recompile.
  11.   Interpretation would make goal function evaluation slower than it is now,
  12.   but goal function evaluation is not critical.
  13.  
  14. * Add code to algebraically prove that a generated sequences are correct.
  15.  
  16. * Add bsrl/bsfl and bfffo to CISC synth.
  17.  
  18. * Check that PERFORM_CLZ works like RS/6000's cntlz and 29k's clz.  Is it
  19.   ok for input == 0?
  20.  
  21. * A major speed improvement would be to make independent insn have a
  22.   canonical order.  Consider `gts' on the SPARC.  This is probably not very
  23.   hard, if insns are enumerated in some clever way and loop variables are
  24.   passed down.
  25.  
  26.   After an instruction that sets carry (and there is another instruction
  27.   with the same effect apart from that it doesn't affect carry), the
  28.   generated carry has to be used.  [Fix this with a reservation vector
  29.   --allow both making and deleting a reservation.  Make reservation when
  30.   carry is generated and delete it when it is used.]  The leaf instructions
  31.   have to munch carry if an unused carry is pending.
  32.  
  33.   Make sure all computed values are used by subsequent instructions.  For
  34.   example, if we have just two more values to compute and three yet unused
  35.   values, the last two instructions have to restrict their input operands.
  36.  
  37. * Efficient pruning of sequences not using generated resources:
  38.  
  39.   Each generated instruction should record it's computed 'resources' in a
  40.   data base of unused resources.  (A written register is such a resource,
  41.   and the carry flag is such a resource.)  When a resource is used by an
  42.   instruction, it's removed from the data base.
  43.  
  44.   At each recursion, we check that the unused resources can be consumed
  45.   with the allowed number of instructions.  If not, we back-track.
  46.  
  47.   Beware: A resource is not 'consumed' when it has been used.  I have
  48.   seen optimal sequences that uses a generated carry more than once.
  49.  
  50. * Shift 32 steps on 68k is well-defined.  LSHIFTR_CO can be used to zero a
  51.   word and simultaneously move the sign bit to the X flag, ASHIFTR_CO can
  52.   be used to propagate the sign bit to the whole word and to the X flag.
  53.   Useful?
  54.  
  55. * Model the exact timing, i.e., instruction overlap, superscalar issue,
  56.   etc.  Requires modelling the CPU internal function units.
  57.  
  58. * `386: bt, clc, cmc, cdq[0->1], lea, shld, shrd, stc.
  59.  
  60. * Make the instruction description cleaner.  Something of this kind would
  61.   be great:
  62.  
  63.   88k:
  64.     {ADD,        "addu        %d{r},%1{r,0},%2{r,[0-FFFF]}"},
  65.     {ADD_CI,    "addu.ci    %d{r},%1{r,0},%2{r,[0-FFFF]}"},
  66.     ...
  67.  
  68.   sparc:
  69.     {ADD,        "add        %d{r},%1{r,0},%2{r,[-1000,+FFF]"},
  70.     {ADD_CI,    "addx        %d{r},%1{r,0},%2{r,[-1000,+FFF]}"},
  71.     ...
  72.  
  73.   We would need a tool to extract the information and generate a 'synth'
  74.   function.  (That instructionn description format would be useful to
  75.   assemblers, disassemblers, and simulators too.)
  76.  
  77. * Include a 'synth' function for several targets in one gso binary.
  78.   Have a command line option -t<target> select which one to use.
  79.